<!DOCTYPE html>
<html lang="cn">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>Amaze UI Admin index Examples</title>
    <meta name="description" content="这是一个 index 页面">
    <meta name="keywords" content="index">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="{$ICON_PATH}favicon.png">
    <link rel="apple-touch-icon-precomposed" href="{$ICON_PATH}app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
    <script src="{$JS_PATH}jquery.min.js"></script>
    <script src="{$JS_PATH}echarts.min.js"></script>
    <link rel="stylesheet" href="{$CSS_PATH}amazeui.min.css"/>
    <link rel="stylesheet" href="{$CSS_PATH}amazeui.datatables.min.css"/>
    <link rel="stylesheet" href="{$CSS_PATH}app.css">
    <link rel="stylesheet" href="{$CSS_PATH}toastr.min.css"/>
    <script src="{$JS_PATH}toastr.min.js"></script>
    <style type="text/css">
        img {
            max-width: 100%;
        }
    </style>

</head>
{block name="body"}
<body data-type="index">
{/block}
<script src="{$JS_PATH}theme.js"></script>
<div class="am-g tpl-g">
    <!-- 头部 -->
    <header>
        <!-- logo -->
        <div class="am-fl tpl-header-logo">
            <a href="javascript:;"><img src="{$IMG_PATH}logos.jpg" alt=""></a>
        </div>
        <!-- 右侧内容 -->
        <div class="tpl-header-fluid">
            <!-- 侧边切换 -->
            <div class="am-fl tpl-header-switch-button am-icon-list">
                    <span>

                </span>
            </div>

            <!-- 其它功能-->
            <div class="am-fr tpl-header-navbar">
                <ul>
                    <!-- 欢迎语 -->
                    <li class="am-text-sm tpl-header-navbar-welcome">
                        <a href="javascript:;">欢迎你, <span>{$admin_name}</span> </a>
                    </li>

                    <!-- 新邮件 -->
                    <li class="am-dropdown tpl-dropdown" data-am-dropdown>
                        <a href="javascript:;" class="am-dropdown-toggle tpl-dropdown-toggle" data-am-dropdown-toggle>
                            <i class="am-icon-envelope"></i>
                            <span class="am-badge am-badge-success am-round item-feed-badge">4</span>
                        </a>
                        <!-- 弹出列表 -->
                        <ul class="am-dropdown-content tpl-dropdown-content">
                            <li class="tpl-dropdown-menu-messages">
                                <a href="javascript:;" class="tpl-dropdown-menu-messages-item am-cf">
                                    <div class="menu-messages-ico">
                                        <img src="{$IMG_PATH}user04.png" alt="">
                                    </div>
                                    <div class="menu-messages-time">
                                        3小时前
                                    </div>
                                    <div class="menu-messages-content">
                                        <div class="menu-messages-content-title">
                                            <i class="am-icon-circle-o am-text-success"></i>
                                            <span>夕风色</span>
                                        </div>
                                        <div class="am-text-truncate"> Amaze UI 的诞生，依托于 GitHub 及其他技术社区上一些优秀的资源；Amaze UI
                                            的成长，则离不开用户的支持。
                                        </div>
                                        <div class="menu-messages-content-time">2016-09-21 下午 16:40</div>
                                    </div>
                                </a>
                            </li>

                            <li class="tpl-dropdown-menu-messages">
                                <a href="javascript:;" class="tpl-dropdown-menu-messages-item am-cf">
                                    <div class="menu-messages-ico">
                                        <img src="{$IMG_PATH}user02.png" alt="">
                                    </div>
                                    <div class="menu-messages-time">
                                        5天前
                                    </div>
                                    <div class="menu-messages-content">
                                        <div class="menu-messages-content-title">
                                            <i class="am-icon-circle-o am-text-warning"></i>
                                            <span>{$admin_name}</span>
                                        </div>
                                        <div class="am-text-truncate"> 为了能最准确的传达所描述的问题， 建议你在反馈时附上演示，方便我们理解。</div>
                                        <div class="menu-messages-content-time">2016-09-16 上午 09:23</div>
                                    </div>
                                </a>
                            </li>
                            <li class="tpl-dropdown-menu-messages">
                                <a href="javascript:;" class="tpl-dropdown-menu-messages-item am-cf">
                                    <i class="am-icon-circle-o"></i> 进入列表…
                                </a>
                            </li>
                        </ul>
                    </li>

                    <!-- 新提示 -->
                    <li class="am-dropdown" data-am-dropdown>
                        <a href="javascript:;" class="am-dropdown-toggle" data-am-dropdown-toggle>
                            <i class="am-icon-bell"></i>
                            <span class="am-badge am-badge-warning am-round item-feed-badge">5</span>
                        </a>

                        <!-- 弹出列表 -->
                        <ul class="am-dropdown-content tpl-dropdown-content">
                            <li class="tpl-dropdown-menu-notifications">
                                <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                    <div class="tpl-dropdown-menu-notifications-title">
                                        <i class="am-icon-line-chart"></i>
                                        <span> 有6笔新的销售订单</span>
                                    </div>
                                    <div class="tpl-dropdown-menu-notifications-time">
                                        12分钟前
                                    </div>
                                </a>
                            </li>
                            <li class="tpl-dropdown-menu-notifications">
                                <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                    <div class="tpl-dropdown-menu-notifications-title">
                                        <i class="am-icon-star"></i>
                                        <span> 有3个来自人事部的消息</span>
                                    </div>
                                    <div class="tpl-dropdown-menu-notifications-time">
                                        30分钟前
                                    </div>
                                </a>
                            </li>
                            <li class="tpl-dropdown-menu-notifications">
                                <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                    <div class="tpl-dropdown-menu-notifications-title">
                                        <i class="am-icon-folder-o"></i>
                                        <span> 上午开会记录存档</span>
                                    </div>
                                    <div class="tpl-dropdown-menu-notifications-time">
                                        1天前
                                    </div>
                                </a>
                            </li>


                            <li class="tpl-dropdown-menu-notifications">
                                <a href="javascript:;" class="tpl-dropdown-menu-notifications-item am-cf">
                                    <i class="am-icon-bell"></i> 进入列表…
                                </a>
                            </li>
                        </ul>
                    </li>

                    <!-- 退出 -->
                    <li class="am-text-sm">
                        <a href="{:url('admin/login/outLogin')}">
                            <span class="am-icon-sign-out"></span> 退出
                        </a>
                    </li>
                </ul>
            </div>
        </div>

    </header>
    <!-- 风格切换 -->
    <div class="tpl-skiner">
        <div class="tpl-skiner-toggle am-icon-cog">
        </div>
        <div class="tpl-skiner-content">
            <div class="tpl-skiner-content-title">
                选择主题
            </div>
            <div class="tpl-skiner-content-bar">
                <span class="skiner-color skiner-white" data-color="theme-white"></span>
                <span class="skiner-color skiner-black" data-color="theme-black"></span>
            </div>
        </div>
    </div>
    <!-- 侧边导航栏 -->
    <div class="left-sidebar">
        <!-- 用户信息 -->
        <div class="tpl-sidebar-user-panel">
            <div class="tpl-user-panel-slide-toggleable">
                <div class="tpl-user-panel-profile-picture">
                    <img src="{$IMG_PATH}user04.png" alt="">
                </div>
                <span class="user-panel-logged-in-text">
              <i class="am-icon-circle-o am-text-success tpl-user-panel-status-icon"></i>
              {$admin_name}
          </span>

            </div>
        </div>

        <!-- 菜单 -->
        <ul class="sidebar-nav  menu">
            <li class="sidebar-nav-link">
                <a href="{:url('admin/index/index')}" class="active">
                    <i class="am-icon-home sidebar-nav-link-logo"></i> 首页
                </a>
            </li>
            <li class="sidebar-nav-link">
                <a href="javascript:;" class="sidebar-nav-sub-title" id="administrate">
                    <i class="am-icon-table sidebar-nav-link-logo"></i> 权限管理
                    <span class="am-icon-chevron-down am-fr am-margin-right-sm sidebar-nav-sub-ico"></span>
                </a>
                <ul class="sidebar-nav sidebar-nav-sub" style="display: block;">
                    <li class="sidebar-nav-link">
                        <a href="{:url('admin/admin/index')}" id="administrate-admin">
                            <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 管理员管理
                        </a>
                    </li>

                    <li class="sidebar-nav-link">
                        <a href="{:url('admin/role/index')}" id="administrate-role">
                            <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 角色管理
                        </a>
                    </li>

                    <li class="sidebar-nav-link">
                        <a href="{:url('admin/access/index')}" id="administrate-access">
                            <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 权限管理
                        </a>
                    </li>
                </ul>
            </li>
            <li class="sidebar-nav-link">
                <a href="javascript:;" class="sidebar-nav-sub-title" id="QandA">
                    <i class="am-icon-table sidebar-nav-link-logo"></i> 问答管理
                    <span class="am-icon-chevron-down am-fr am-margin-right-sm sidebar-nav-sub-ico"></span>
                </a>
                <ul class="sidebar-nav sidebar-nav-sub" style="display: block;">
                    <li class="sidebar-nav-link">
                        <a href="{:url('admin/question/index')}" id="administrate-question">
                            <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 问题管理
                        </a>
                    </li>

                    <li class="sidebar-nav-link">
                        <a href="{:url('admin/answer/index')}" id="administrate-answer">
                            <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 回答管理
                        </a>
                    </li>

                    <li class="sidebar-nav-link">
                        <a href="{:url('admin/reply/index')}" id="administrate-reply">
                            <span class="am-icon-angle-right sidebar-nav-link-logo"></span> 评论管理
                        </a>
                    </li>
                </ul>
            </li>
            <li class="sidebar-nav-link">
                <a href="javascript:;" class="sidebar-nav-sub-title" id="QandA">
                    <i class="am-icon-table sidebar-nav-link-logo"></i> 关于我们
                    <span class="am-icon-chevron-down am-fr am-margin-right-sm sidebar-nav-sub-ico"></span>
                </a>
                <ul class="sidebar-nav sidebar-nav-sub" style="display: block;">
                    <li class="sidebar-nav-link">
                        <a href="{:url('admin/aboutbanner/index')}" id="administrate-question">
                            <span class="am-icon-angle-right sidebar-nav-link-logo"></span> banner管理
                        </a>
                    </li>
                </ul>
            </li>
            <li class="sidebar-nav-link">
                <a href="{:url('admin/user/index')}">
                    <i class="am-icon-calendar sidebar-nav-link-logo"></i> 用户管理
                </a>
            </li>
            <li class="sidebar-nav-link">
                <a href="chart.html">
                    <i class="am-icon-bar-chart sidebar-nav-link-logo"></i> 统计管理

                </a>
            </li>
        </ul>
    </div>


    <!-- 内容区域 -->
    <div class="tpl-content-wrapper">
{block name="main"}
        <div class="row-content am-cf">
            <div class="row am-cf">
                <div class="am-u-sm-12 am-u-md-8">
                    <div class="widget am-cf">
                        <div class="widget-head am-cf">
                            <div class="widget-title am-fl">月度财务收支计划</div>
                            <div class="widget-function am-fr">
                                <a href="javascript:;" class="am-icon-cog"></a>
                            </div>
                        </div>
                        <div class="widget-body-md widget-body tpl-amendment-echarts am-fr" id="tpl-echarts">

                        </div>
                    </div>
                </div>

                <div class="am-u-sm-12 am-u-md-4">
                    <div class="widget am-cf">
                        <div class="widget-head am-cf">
                            <div class="widget-title am-fl">专用服务器负载</div>
                            <div class="widget-function am-fr">
                                <a href="javascript:;" class="am-icon-cog"></a>
                            </div>
                        </div>
                        <div class="widget-body widget-body-md am-fr">

                            <div class="am-progress-title">CPU Load <span class="am-fr am-progress-title-more">28% / 100%</span></div>
                            <div class="am-progress">
                                <div class="am-progress-bar" style="width: 15%"></div>
                            </div>
                            <div class="am-progress-title">CPU Load <span class="am-fr am-progress-title-more">28% / 100%</span></div>
                            <div class="am-progress">
                                <div class="am-progress-bar  am-progress-bar-warning" style="width: 75%"></div>
                            </div>
                            <div class="am-progress-title">CPU Load <span class="am-fr am-progress-title-more">28% / 100%</span></div>
                            <div class="am-progress">
                                <div class="am-progress-bar am-progress-bar-danger" style="width: 35%"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>


            <div class="widget am-cf">
                <div id="category" style="width: 1200px;height:400px;"></div>
                {volist name="catelist" id="c"}
                <span class="catelist" data{$i-1}="{'value':'{$c['count']}','name':'{$c['name']}'}," cate{$i-1}="{$c['name']}"></span>
                {/volist}
                <script type="text/javascript">
                    var catelist = $('.catelist');
                    var data3 = [];
                    var data4 = [];
                    var myChart1 = echarts.init(document.getElementById('category'));
                    for (var i = 0;i<catelist.length;i++){
                        data3.push(catelist[i].getAttribute('cate'+i));
                        data4.push(catelist[i].getAttribute('data'+i));
                    }
                    data4 = data4.join('');
                    data4 = '['+data4.replace(/,$/,'')+']';
                    data4 = data4.replace(/'/g,'"');
                    var jsonObj = JSON.parse(data4);
                    var option1 = {
                        title : {
                            text: '分类的问题占比',
                            x: 'center'
                        },
                        tooltip: {
                            trigger: 'item',
                            formatter: "{a} <br/>{b} : {c} ({d}%)"
                        },
                        legend: {
                            orient: 'vertical',
                            left: 'left',
                            data: data3
                        },
                        series : [
                            {
                                name: '问题总数',
                                type: 'pie',
                                radius : '75%',
                                center: ['50%', '60%'],
                                data:jsonObj,
                                itemStyle: {
                                    emphasis: {
                                        shadowBlur: 10,
                                        shadowOffsetX: 0,
                                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                                    }
                                }
                            }
                        ]
                        };
                    myChart1.setOption(option1);
                </script>
            </div>


            <div class="widget am-cf">
                <div id="main" style="width: 1200px;height:400px;"></div>
                {volist name="queslikes" id="q"}
                    <span class="queslikes" data{$i-1}="{$q['title']}" like{$i-1}="{$q['likes']}"></span>
                {/volist}
                <script type="text/javascript">
                    var questions = $('.queslikes');
                    var data1 = [];
                    var data2 = [];
                    for (var i = 0;i<questions.length;i++){
                       data1.push(questions[i].getAttribute('data'+i));
                       data2.push(questions[i].getAttribute('like'+i));
                    }
                    // 基于准备好的dom，初始化echarts实例
                    var myChart = echarts.init(document.getElementById('main'));

                    // 指定图表的配置项和数据
                    var option = {
                        title: {
                            text: '收藏最多的问题'
                        },
                        tooltip: {},
                        legend: {
                            data:['收藏']
                        },
                        xAxis: {
                            data: data1
                        },
                        yAxis: {},
                        dataZoom: [
                            {   // 这个dataZoom组件，默认控制x轴。
                                type: 'slider', // 这个 dataZoom 组件是 slider 型 dataZoom 组件
                                start: 10,      // 左边在 10% 的位置。
                                end: 60         // 右边在 60% 的位置。
                            }
                        ],
                        series: [{
                            name: '收藏',
                            type: 'bar',
                            data: data2
                        }]
                    };

                    // 使用刚指定的配置项和数据显示图表。
                    myChart.setOption(option);
                </script>
            </div>


            <div class="widget am-cf">
                <div class="widget-head am-cf">
                    <div class="widget-title am-fl">折线柱图</div>
                    <div class="widget-function am-fr">
                        <a href="javascript:;" class="am-icon-cog"></a>
                    </div>
                </div>
                <div class="widget-body am-fr">
                    <div style="height: 400px" id="tpl-echarts-C">

                    </div>
                </div>
            </div>

        </div>

{/block}
    </div>

</div>
<!-- </div> -->
<div id="Modals"
     style="position:fixed;top: 0;height: 100%;width:100%;background-color: rgba(0,0,0,0.5);z-index: 99999;display:none;">
    {block name="Modals"}
    {/block}
</div>
<!-- 
<script >
    $(function(){
        // 阻止小箭头点击事件冒泡，会导致无法开关子级列表
        // $(".sidebar-nav-sub-ico").click(function(event){
        //     event.stopPropagation();
        // });
        // 废弃，由各module激活点亮
        // $('.menu > .sidebar-nav-link > a').click(function(){
        //     $('.sidebar-nav-link > a').removeClass("active");
        //     $(this).addClass("active");
        // });
        // $('.sidebar-nav-sub > li > a').click(function(){
        //     $('.sidebar-nav-sub > li > a').removeClass("sub-active");
        //     $(this).addClass("sub-active");
        // });

    });
</script>
 -->
<script type="text/javascript">var cnzz_protocol = (("https:" == document.location.protocol) ? " https://" : " http://");document.write(unescape("%3Cspan id='cnzz_stat_icon_1267350883'%3E%3C/span%3E%3Cscript src='" + cnzz_protocol + "s13.cnzz.com/z_stat.php%3Fid%3D1267350883%26show%3Dpic1' type='text/javascript'%3E%3C/script%3E"));</script>
</body>


<script src="{$JS_PATH}amazeui.min.js"></script>
<script src="{$JS_PATH}amazeui.datatables.min.js"></script>
<script src="{$JS_PATH}dataTables.responsive.min.js"></script>
<script src="{$JS_PATH}app.js"></script>
</html>